package com.oig.sys.file.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupChange;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Schema
@Data
public class BusFileInfoDto {

//    @Schema(description = "应用id")
//    @NotNull(message = "参数错误,应用id不能为空", groups= {GroupAdd.class, GroupEdit.class, GroupChange.class})
//    private Integer systemId;
//    @Schema(description = "应用名称")
//    private String systemName;

    @Schema(description = "主业务类型,01-代理 02-仓储 03-运输")
    @NotEmpty(message = "参数错误,单据类型不能为空", groups= {GroupAdd.class, GroupEdit.class, GroupChange.class})
    private String businessType;

    @Schema(description = "业务单号,代理（主单号是订单号）仓储（主单号是入库单号）运输（主单号是运单号）")
    //@NotEmpty(message = "参数错误,单据类型不能为空", groups= {GroupAdd.class, GroupEdit.class, GroupChange.class})
    private String businessOrderId;

    @Schema(description = "单据类型")
    @NotEmpty(message = "参数错误,单据类型不能为空", groups= {GroupAdd.class, GroupEdit.class, GroupChange.class})
    private String relationType;

    @Schema(description = "业务单号")
    //@NotEmpty(message = "参数错误,业务单号不能为空", groups= {GroupAdd.class, GroupEdit.class, GroupChange.class})
    private String relationId;

    @Valid
    private List<FileInfoDto> list;
}
